home *** CD-ROM | disk | FTP | other *** search
- Path: newshost.lanl.gov!tanmoy
- From: tanmoy@qcd.lanl.gov (Tanmoy Bhattacharya)
- Newsgroups: comp.lang.c++,comp.lang.c
- Subject: Re: Opinions on Visual C/C++
- Date: 06 Mar 1996 15:31:07 GMT
- Organization: Los Alamos National Laboratory
- Message-ID: <TANMOY.96Mar6083107@qcd.lanl.gov>
- References: <4hdkm7$2jk@huron.eel.ufl.edu> <Dnq94s.Cx3@emr1.emr.ca>
- <4hhfho$igo@news.interpath.net> <4hj26l$6oj@flood.xnet.com>
- NNTP-Posting-Host: qcd.lanl.gov
- Mime-Version: 1.0
- Content-Type: text
- In-reply-to: kd9fb@xnet.com's message of Wed, 06 Mar 1996 03:57:08 GMT
-
- In article <4hj26l$6oj@flood.xnet.com>
- kd9fb@xnet.com (Peter Mikalajunas) writes:
- <snip>
- PM: As long as the switch is there at compile time. I have yet
- PM: to work with a compiler that defaulted to ANSI. Every one
- PM: requires a conscious effort on the part of the programmer.
- PM:
- PM: This make sense. The vendor is selling a product to work
- PM: on a particular platform. Throwing in ANSI compatibility is just
- PM: one more item to put on the glossy. If you are asking
- PM: $30,000 for a compiler, your customer has every right
- PM: to expect it to handle platform specific issues. Because
- PM: it can do low level RMS databases on a VMS system
- PM: doesn't make it a different language. It merely gives
- PM: the tool added flexibility.
-
- I do not completely agree with this: The C standard requires the
- compiler to complain about invalid usage in certain situations. Any
- compiler `feature' which does _not_ complain in these situations is a
- misfeature: whether people on any particular platform find it handy or
- not. Thus, for example, popular compilers manage to compile the
- following without warning:
-
- int main(void) {
- int a=2; int b[a] = {&a};
- return 0;
- }
-
- This I believe is wrong! There is absolutely no reason to accept such
- constructs silently in the default mode. (I would prefer that the user
- had to say
-
- cc -but_I_must_have_extensions_as_I_clearly_do_not_need_portability
-
- to compile such stuff. (Note that I would use that flag quite often,
- but I still do not support absence of warning as the default.)
-
- Extensions must apply silently only to those constructs that do not
- need a diagnostic according to the standard. There is also very little
- reason to extend the syntax of C.
-
- It is also bad practice to define meanings for most `undefined'
- behaviours in C. I think any compiler that defines i=i++; is doing its
- users a disservice. Even within these limits, C bindings to OS
- features are trivial. Customers have the right to expect that, they
- have a bigger right to expect that the compiler follows the only
- document that claims to define C.
-
- Cheers
- Tanmoy
- --
- tanmoy@qcd.lanl.gov(128.165.23.46) DECNET: BETA::"tanmoy@lanl.gov"(1.218=1242)
- Tanmoy Bhattacharya O:T-8(MS B285)LANL,NM87545 H:#9,3000,Trinity Drive,NM87544
- Others see <gopher://yaleinfo.yale.edu:7700/00/Internet-People/internet-mail>,
- <http://alpha.acast.nova.edu/cgi-bin/inmgq.pl>or<ftp://csd4.csd.uwm.edu/pub/
- internetwork-mail-guide>. -- <http://nqcd.lanl.gov/people/tanmoy/tanmoy.html>
- fax: 1 (505) 665 3003 voice: 1 (505) 665 4733 [ Home: 1 (505) 662 5596 ]
-